package com.plum.admin.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import java.util.List;

import com.plum.admin.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统角色表
 * </p>
 *
 * @author 子丶沫
 * @since 2021-08-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_role")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="SysRole对象", description="系统角色表")
public class SysRole extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色名称")
    @TableField("role_name")
    private String roleName;

    @ApiModelProperty(value = "角色标识")
    @TableField("role_code")
    private String roleCode;

    @ApiModelProperty(value = "角色描述")
    @TableField("role_desc")
    private String roleDesc;

    @ApiModelProperty(value = "数据权限类型")
    @TableField("ds_type")
    private Integer dsType;

    @ApiModelProperty(value = "数据权限范围 1 全部 2 本级 3 本级以及子级 4 自定义")
    @TableField("ds_scope")
    private String dsScope;

    @ApiModelProperty(value = "租户id")
    @TableField("tenant_id")
    private Integer tenantId;

    @ApiModelProperty(value = "角色菜单id集合")
    @TableField(exist = false)
    private List<String> menuIdList;

    /**
     * 角色部门集合
     */
    @TableField(exist = false)
    private List<String> roleDeptIdList;

}
